Integrand size = 27, antiderivative size = 416 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right ) \tan (e+f x)}{c^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {\sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) \tan (e+f x)}{(c-d)^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {\sqrt {a} d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c (c-d) (c+d)^{3/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {2 \sqrt {a} (2 c-d) d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right ) \tan (e+f x)}{c^2 (c-d)^2 \sqrt {c+d} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {d^2 \tan (e+f x)}{c \left (c^2-d^2\right ) f \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))} \]
d^2*tan(f*x+e)/c/(c^2-d^2)/f/(c+d*sec(f*x+e))/(a+a*sec(f*x+e))^(1/2)+2*arc tanh((a-a*sec(f*x+e))^(1/2)/a^(1/2))*a^(1/2)*tan(f*x+e)/c^2/f/(a-a*sec(f*x +e))^(1/2)/(a+a*sec(f*x+e))^(1/2)+d^(3/2)*arctanh(d^(1/2)*(a-a*sec(f*x+e)) ^(1/2)/a^(1/2)/(c+d)^(1/2))*a^(1/2)*tan(f*x+e)/c/(c-d)/(c+d)^(3/2)/f/(a-a* sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2)-arctanh(1/2*(a-a*sec(f*x+e))^(1/2 )*2^(1/2)/a^(1/2))*2^(1/2)*a^(1/2)*tan(f*x+e)/(c-d)^2/f/(a-a*sec(f*x+e))^( 1/2)/(a+a*sec(f*x+e))^(1/2)+2*(2*c-d)*d^(3/2)*arctanh(d^(1/2)*(a-a*sec(f*x +e))^(1/2)/a^(1/2)/(c+d)^(1/2))*a^(1/2)*tan(f*x+e)/c^2/(c-d)^2/f/(c+d)^(1/ 2)/(a-a*sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2)
Time = 11.36 (sec) , antiderivative size = 337, normalized size of antiderivative = 0.81 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\frac {(d+c \cos (e+f x))^2 \sec ^{\frac {5}{2}}(e+f x) \left (\frac {c (c-d) d^2 \sin (e+f x)}{(c+d) (d+c \cos (e+f x)) \sqrt {\sec (e+f x)}}+\frac {\left (\sqrt {2} \left (2 (c-d)^2 (c+d)^{3/2} \text {arctanh}\left (\frac {\tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {-\frac {\cos (e+f x)}{1+\cos (e+f x)}}}\right )+d^{3/2} \left (5 c^2+c d-2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d} \sqrt {-\frac {\cos (e+f x)}{1+\cos (e+f x)}}}\right )\right )-2 c^2 (c+d)^{3/2} \text {arctanh}\left (\frac {\tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )}}\right )\right ) \sqrt {\cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x)} \sqrt {-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )}}{(c+d)^{3/2} \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )}}\right )}{c^2 (c-d)^2 f \sqrt {a (1+\sec (e+f x))} (c+d \sec (e+f x))^2} \]
((d + c*Cos[e + f*x])^2*Sec[e + f*x]^(5/2)*((c*(c - d)*d^2*Sin[e + f*x])/( (c + d)*(d + c*Cos[e + f*x])*Sqrt[Sec[e + f*x]]) + ((Sqrt[2]*(2*(c - d)^2* (c + d)^(3/2)*ArcTanh[Tan[(e + f*x)/2]/Sqrt[-(Cos[e + f*x]/(1 + Cos[e + f* x]))]] + d^(3/2)*(5*c^2 + c*d - 2*d^2)*ArcTanh[(Sqrt[d]*Tan[(e + f*x)/2])/ (Sqrt[c + d]*Sqrt[-(Cos[e + f*x]/(1 + Cos[e + f*x]))])]) - 2*c^2*(c + d)^( 3/2)*ArcTanh[Tan[(e + f*x)/2]/Sqrt[-1 + Tan[(e + f*x)/2]^2]])*Sqrt[Cos[(e + f*x)/2]^2*Sec[e + f*x]]*Sqrt[-1 + Tan[(e + f*x)/2]^2])/((c + d)^(3/2)*Sq rt[Sec[(e + f*x)/2]^2])))/(c^2*(c - d)^2*f*Sqrt[a*(1 + Sec[e + f*x])]*(c + d*Sec[e + f*x])^2)
Time = 0.58 (sec) , antiderivative size = 301, normalized size of antiderivative = 0.72, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 4428, 27, 198, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a} \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4428 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {\cos (e+f x)}{a (\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a \tan (e+f x) \int \frac {\cos (e+f x)}{(\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 198 |
\(\displaystyle -\frac {a \tan (e+f x) \int \left (\frac {(2 c-d) d^2}{c^2 (c-d)^2 \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))}+\frac {d^2}{c (c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}+\frac {\cos (e+f x)}{c^2 \sqrt {a-a \sec (e+f x)}}-\frac {1}{(c-d)^2 (\sec (e+f x)+1) \sqrt {a-a \sec (e+f x)}}\right )d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \tan (e+f x) \left (-\frac {2 d^{3/2} (2 c-d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right )}{\sqrt {a} c^2 (c-d)^2 \sqrt {c+d}}-\frac {2 \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a}}\right )}{\sqrt {a} c^2}-\frac {d^{3/2} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a-a \sec (e+f x)}}{\sqrt {a} \sqrt {c+d}}\right )}{\sqrt {a} c (c-d) (c+d)^{3/2}}+\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a} (c-d)^2}-\frac {d^2 \sqrt {a-a \sec (e+f x)}}{a c \left (c^2-d^2\right ) (c+d \sec (e+f x))}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
-((a*((-2*ArcTanh[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a]])/(Sqrt[a]*c^2) + (Sqrt [2]*ArcTanh[Sqrt[a - a*Sec[e + f*x]]/(Sqrt[2]*Sqrt[a])])/(Sqrt[a]*(c - d)^ 2) - (d^(3/2)*ArcTanh[(Sqrt[d]*Sqrt[a - a*Sec[e + f*x]])/(Sqrt[a]*Sqrt[c + d])])/(Sqrt[a]*c*(c - d)*(c + d)^(3/2)) - (2*(2*c - d)*d^(3/2)*ArcTanh[(S qrt[d]*Sqrt[a - a*Sec[e + f*x]])/(Sqrt[a]*Sqrt[c + d])])/(Sqrt[a]*c^2*(c - d)^2*Sqrt[c + d]) - (d^2*Sqrt[a - a*Sec[e + f*x]])/(a*c*(c^2 - d^2)*(c + d*Sec[e + f*x])))*Tan[e + f*x])/(f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec [e + f*x]]))
3.2.70.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_))^(q_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && IntegersQ[p, q]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[a^2*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(a + b*x)^(m - 1/2)*((c + d *x)^n/(x*Sqrt[a - b*x])), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0 ] && IntegerQ[m - 1/2]
Leaf count of result is larger than twice the leaf count of optimal. \(54029\) vs. \(2(355)=710\).
Time = 16.58 (sec) , antiderivative size = 54030, normalized size of antiderivative = 129.88
Time = 108.96 (sec) , antiderivative size = 2508, normalized size of antiderivative = 6.03 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\text {Too large to display} \]
[1/2*(2*(c^2*d^2 - c*d^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + sqrt(2)*(a*c^3*d + a*c^2*d^2 + (a*c^4 + a*c^3*d)*cos(f *x + e)^2 + (a*c^4 + 2*a*c^3*d + a*c^2*d^2)*cos(f*x + e))*sqrt(-1/a)*log(( 2*sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(-1/a)*cos(f*x + e)* sin(f*x + e) + 3*cos(f*x + e)^2 + 2*cos(f*x + e) - 1)/(cos(f*x + e)^2 + 2* cos(f*x + e) + 1)) - (5*a*c^2*d^2 + a*c*d^3 - 2*a*d^4 + (5*a*c^3*d + a*c^2 *d^2 - 2*a*c*d^3)*cos(f*x + e)^2 + (5*a*c^3*d + 6*a*c^2*d^2 - a*c*d^3 - 2* a*d^4)*cos(f*x + e))*sqrt(-d/(a*c + a*d))*log((2*(c + d)*sqrt(-d/(a*c + a* d))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + (c + 2*d)*cos(f*x + e)^2 + (c + d)*cos(f*x + e) - d)/(c*cos(f*x + e)^2 + (c + d)*cos(f*x + e) + d)) - 2*(c^3*d - c^2*d^2 - c*d^3 + d^4 + (c^4 - c^3*d - c^2*d^2 + c*d^3)*cos(f*x + e)^2 + (c^4 - 2*c^2*d^2 + d^4)*cos(f*x + e))* sqrt(-a)*log((2*a*cos(f*x + e)^2 + 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/co s(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)))/((a*c^6 - a*c^5*d - a*c^4*d^2 + a*c^3*d^3)*f*cos(f*x + e)^2 + (a*c^ 6 - 2*a*c^4*d^2 + a*c^2*d^4)*f*cos(f*x + e) + (a*c^5*d - a*c^4*d^2 - a*c^3 *d^3 + a*c^2*d^4)*f), 1/2*(2*(c^2*d^2 - c*d^3)*sqrt((a*cos(f*x + e) + a)/c os(f*x + e))*cos(f*x + e)*sin(f*x + e) + sqrt(2)*(a*c^3*d + a*c^2*d^2 + (a *c^4 + a*c^3*d)*cos(f*x + e)^2 + (a*c^4 + 2*a*c^3*d + a*c^2*d^2)*cos(f*x + e))*sqrt(-1/a)*log((2*sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*...
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\int \frac {1}{\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \left (c + d \sec {\left (e + f x \right )}\right )^{2}}\, dx \]
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\int { \frac {1}{\sqrt {a \sec \left (f x + e\right ) + a} {\left (d \sec \left (f x + e\right ) + c\right )}^{2}} \,d x } \]
Exception generated. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E rror: Bad Argument Value
Timed out. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x))^2} \, dx=\int \frac {1}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]